package example.springboot.mapper;

import example.springboot.model.t_user;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;

@Mapper
public interface userMapper extends tk.mybatis.mapper.common.Mapper<t_user> {
        @Select("select * from t_user where token=#{token}")
        t_user byTokenFind(@Param("token") String token);
        @Select("select * from t_user where accountid=#{accountid}")
        t_user byAccountidFind(@Param("accountid") String accountid);
        @Update("UPDATE t_user set token=#{token},gmtcreate=#{gmtcreate}, gmtmodified=#{gmtmodified}")
        void byIdUpdate(@Param("token") String token, @Param("gmtcreate") Long gmtcreate, @Param("gmtmodified") Long gmtmodified);
}
